{% extends "admin/models/base_forms.html" %}

{% block breadcrumbs %}
 {{ super() }}
 <li><span class="divider">/</span> <a href=".">{{ cur_op.verbose_name }}</a></li>
{% endblock %}

{% block tab_add_class %}active{% endblock %}

{% block content %}
  {% include "admin/includes/form_raw_id.html" %}
  {% if form.errors %}
    <div class="alert alert-block alert-error">
      <a class="close" data-dismiss="alert" href="#">×</a>
      <p>There were errors with your form submission</p>
    </div>
  {% endif %}
  <form method="post" action="." class="add form-horizontal" enctype="multipart/form-data">
    <fieldset>
      <legend>{{ cur_op.verbose_name }} {{ model_admin.get_display_name() }}</legend>
      {% for field in form %}
        {{ admin_field(field) }}
      {% endfor %}
      {% block extra_form %}{% endblock %}
      <div class="form-actions">
        <button class="btn btn-primary" name="save" type="submit">提交</button>
        <button class="btn" name="save_add" type="submit">提交并再次</button>
        <a class="btn" href="{{ url_for(model_admin.get_url_name('index')) }}">取消</a>
      </div>
    </fieldset>
  </form>
{% endblock %}
